package com.xhb.biz.feign;

import cn.hutool.json.JSONUtil;
import org.noear.solon.annotation.Component;

/**
 * @author tanyukun
 */
@Component
public class FeignUtils<T> {


    public static String getFeignErrorMessage(Exception e) {
        String message = e.getMessage();
        String messageJson = message.substring(message.indexOf("{"));
        return JSONUtil.parseObj(messageJson).getStr("message");
    }
}
